import Vue from "vue";
import App from "./App";
import store from "./store"; // store
import plugins from "./plugins"; // plugins
import "./permission"; // permission
import messages from "./i18n/index.js";
import VueI18n from "vue-i18n";

const lang = uni.getLocale();
Vue.use(VueI18n);
// 通过选项创建 VueI18n 实例
const i18n = new VueI18n({
  locale: lang, // 设置地区
  messages // 设置地区信息
});
Vue.use(plugins);

Vue.config.productionTip = false;
Vue.prototype.$store = store;

App.mpType = "app";

const app = new Vue({
  i18n,
  ...App
});

app.$mount();
